#ifndef FILEWRITER_H
#define FILEWRITER_H
#include<fstream>
#include<iostream>
#include<sstream>
using namespace std;
class FileWriter
{
public:
    void Write(const string & encryptStr, const string& fileNameDes)
    {
        cout << "保存密码，写入文件。" << endl;
        fstream fs(fileNameDes, ios_base::out);
        if(fs.is_open())
        {
            fs.write(encryptStr.c_str(), encryptStr.size());
        }
        else
        {
            cout << "文件写入失败！" << endl;
        }
    }
};
#endif